<%-- 
    Document   : editAccount
    Created on : May 29, 2012, 10:12:14 PM
    Author     : Owner
--%>

<%--
<%if (Long.parseLong(String.valueOf(session.getAttribute("loginRoleId"))) == 0) {%>
<%@include file="/jsp/top.jsp"%>
<%} else if (Long.parseLong(String.valueOf(session.getAttribute("loginRoleId"))) == 1) {%>
<%@include file="/jsp/userTop.jsp"%>
<%} else if (Long.parseLong(String.valueOf(session.getAttribute("loginRoleId"))) == 2) {%>
<%@include file="/jsp/adminTop.jsp"%>
<%}%>--%>

<%@include file="/jsp/top.jsp"%>

<html>
    <head>
        <title>Edit Personal Information</title>        
    </head>
    <body>
        <div class="clear"></div>
        <table cellspacing="5px" width="100%" align="center">
            <tr>
                <td>
                    <table cellspacing="5px" width="100%" align="center">
                        <tr>
                            <td style="vertical-align: top;" width="20%">
                                <div class="box-left box-menu">
                                    <div class="block block-account">
                                        <div class="block-title">
                                            <strong>
                                                <span>My Account</span>
                                            </strong>
                                        </div>
                                        <div class="block-content">
                                            <ul>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showAccountDashboard">Account Dashboard</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showEditUserPersonalInfo&changePassword='N'">Account Information</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showManageAddress">Manage Address</a></li>
                                                <li><a class="show-dashboard" href="./payment.do?action=showUserOrders">My Orders</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showAccountDashboard">My Wishlists</a></li>
                                                <li><a class="show-dashboard" href="./userAccount.do?action=showNewsletter">Newsletter Subscription</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </td>
                            <td style="vertical-align: top;" width="80%">
                                <div class="account-edit default">
                                    <div class="fieldset" style="padding-bottom: 60px;">
                                        <html:form action="/userAccount" method="post">
                                            <div class="fieldset register-top">
                                                <h2 class="legend">Account Information</h2>
                                                <div class="form-table">
                                                    <logic:present name="userInfoBean" scope="request">

                                                        <table border="0" width="100%" align="center" cellspacing="5px">
                                                            <tr class="field name-prefix">
                                                                <td align="right"><bean:message key="user.prefix"/><em>*</em></td>
                                                                <td align="center" class="input-box"><html:select name="userInfoBean" property="titleId" style="width:200px" >
                                                                        <html:option value="0">--- Select ---</html:option>
                                                                        <html:options collection="titleMap" property="key" labelProperty="value"/>
                                                                    </html:select>
                                                                </td>
                                                            </tr>
                                                            <tr><td colspan="2" align="center"><html:errors property="errPrefix"/></td></tr>
                                                            <tr align="center" class="field name-firstname">
                                                                <td align="right"><bean:message key="user.fname"/><em>*</em></td>
                                                                <td class="input-box"><html:text name="userInfoBean" property="firstName" size="30" onblur="this.value=removeSpaces(this.value);"/></td>
                                                            </tr>
                                                            <tr><td colspan="2" align="center"><html:errors property="errFirstName"/></td></tr>
                                                            <tr align="center" class="field name-middlename">
                                                                <td align="right"><bean:message key="user.mname"/></td>
                                                                <td class="input-box"><html:text name="userInfoBean"  property="middleName" size="30" onblur="this.value=removeSpaces(this.value);"/></td>
                                                            </tr>
                                                            <tr><td colspan="2" align="center"><html:errors property="errMiddleName"/></td></tr>
                                                            <tr align="center" class="field name-lastname">
                                                                <td align="right"><bean:message key="user.lname"/><em>*</em></td>
                                                                <td class="input-box"><html:text name="userInfoBean"  property="lastName" size="30" onblur="this.value=removeSpaces(this.value);"/></td>
                                                            </tr>
                                                            <tr><td colspan="2" align="center"><html:errors property="errLastName"/></td></tr>
                                                            <tr align="center" class="field profession">
                                                                <td align="right"><bean:message key="user.profession"/></td>
                                                                <td class="input-box"><html:text name="userInfoBean" property="profession" size="30" /></td>
                                                            </tr>
                                                            <tr><td colspan="2" align="center"><html:errors property="errProfession"/></td></tr>
                                                            <tr align="center" class="field email">
                                                                <td align="right"><bean:message key="user.email"/><em>*</em></td>
                                                                <td class="input-box"><html:text name="userInfoBean" property="emailId" size="30" onblur="this.value=removeSpaces(this.value);"/></td>
                                                            </tr>
                                                            <tr><td colspan="2" align="center"><html:errors property="errEmailId"/></td></tr>
                                                            <tr align="center" class="field dateofbirth">
                                                                <td align="right"><bean:message key="user.dateofbirth"/><em>*</em></td>
                                                                <td class="input-box"><html:text name="userInfoBean" styleId="datepicker" property="dateOfBirth" size="30" onblur="this.value=removeSpaces(this.value);" readonly="true" /></td>
                                                            </tr>
                                                            <tr><td colspan="2" align="center"><html:errors property="errDateOfBirth"/></td></tr>
                                                            <tr align="center" class="field mobileno">
                                                                <td align="right"><bean:message key="user.mobileno"/><em>*</em></td>
                                                                <td class="input-box"><html:text name="userInfoBean" property="mobileNo" size="30" onblur="this.value=removeSpaces(this.value);"/></td>
                                                            </tr>
                                                            <tr><td colspan="2" align="center"><html:errors property="errMobileNo"/></td></tr>
                                                        </table>
                                                        <logic:match property="changePassword" name="userInfoBean" value="Y" >
                                                            <div class="changepassword"><input type="checkbox" name="changePassword" checked="checked" value="Y" /> Change Password</div>
                                                            </logic:match>
                                                            <logic:match property="changePassword" name="userInfoBean" value="N" >
                                                            <div class="changepassword"><html:checkbox property="changePassword" value="N" /> Change Password</div>
                                                        </logic:match>

                                                    </logic:present>
                                                </div>
                                            </div>
                                            <div class="fieldset register-bottom">
                                                <h2 class="legend">Change Password</h2>
                                                <div class="form-table">
                                                    <table border="0" width="100%" align="center" cellspacing="5px">
                                                        <tr align="center" class="field currentpassword">
                                                            <td align="right"><bean:message key="user.currentpassword"/><em>*</em></td>
                                                            <td class="input-box"><html:password property="currentPassword" size="30" onblur="this.value=removeSpaces(this.value);"/></td>
                                                        </tr>
                                                        <tr><td colspan="2" align="center"><html:errors property="errCurrentPassword"/></td></tr>
                                                        <tr align="center" class="field newpassword">
                                                            <td align="right"><bean:message key="user.newpassword"/><em>*</em></td>
                                                            <td class="input-box"><html:password property="newPassword" size="30" onblur="this.value=removeSpaces(this.value);"/></td>
                                                        </tr>
                                                        <tr><td colspan="2" align="center"><html:errors property="errNewPassword"/></td></tr>
                                                        <tr align="center" class="field confirmnewpassword">
                                                            <td align="right"><bean:message key="user.confirmnewpassword"/><em>*</em></td>
                                                            <td class="input-box"><html:password property="confirmNewPassword" size="30" onblur="this.value=removeSpaces(this.value);"/></td>
                                                        </tr>
                                                        <tr><td colspan="2" align="center"><html:errors property="errConfirmNewPassword"/></td></tr>
                                                    </table>
                                                </div>
                                            </div>
                                            <div id="errdividea">
                                                <span id="errspanidea"></span>
                                            </div>
                                            <div class="buttons-set">
                                                <%--<html:submit value="Submit" />--%>
                                                <a style="float:right;" onclick="javascript:return validateEditAccount('./userAccount.do?action=editUserInfo','userBean')"><img src="images/save.png" alt="Save Button" onmouseover="src='images/save-hover.png'" onmouseout="src='images/save.png'"/></a>
                                            </div>
                                        </html:form>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td><%@include file="/jsp/footer.jsp" %></td>
            </tr>
        </table>

    </body>
</html>
